package com.nanyang.tms.dao.receipt;

import com.nanyang.tms.domain.receipt.ReceiptRelationDO;
import com.nanyang.tms.domain.receipt.ReceiptRelationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>Description:()</p>
 *
 * @author lv
 * @date 2022年11月12日 下午10:58:28
 * @Copyright Copyright (c) 2020 www.nanyang.cn Inc. All rights reserved.
 */
@Mapper
public interface ReceiptRelationDao {
    /**
     * <p>deleteByPrimaryKey</p>
     * <p>Description:(根据主键删除)</p>
     *
     * @param id
     * @return int
     */
    int deleteByPrimaryKey(Long id);

    /**
     * <p>insert</p>
     * <p>Description:(新增（所有列）)</p>
     *
     * @param record
     * @return int
     */
    int insert(ReceiptRelationDO record);

    /**
     * <p>selectByPrimaryKey</p>
     * <p>Description:(根据主键查询)</p>
     *
     * @param id
     * @return ReceiptRelationDO
     */
    ReceiptRelationDO selectByPrimaryKey(Long id);

    /**
     * <p>updateByPrimaryKeySelective</p>
     * <p>Description:(修改(选择的列))</p>
     *
     * @param record
     * @return int
     */
    int update(ReceiptRelationDO record);

    /**
     * 根据出货总单查询详情
     * @param receiptCode,companyCode
     * @return
     */
    List<ReceiptRelationVO> selectByCode(@Param("receiptCode")String receiptCode,@Param("companyCode")String companyCode);

    /**
     * 查看收货单里面是否订单
     * @param receiptCode
     * @return
     */
    int countByReceiptCode(String receiptCode);

    /**
     * 运单编码查询
     * @param waybillCode
     * @return
     */
    ReceiptRelationVO selectByWaybillCode(String waybillCode);
}